﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using GrainManage.Data.Service;
using GrainManage.Entities.Column;
using GrainManage.Entities;
using System.Data;
using GrainManage.Server.Business;

namespace GrainManage.Server.Controllers
{
    public class ColumnController : BaseController
    {
        private readonly ColumnBusiness business = new ColumnBusiness();

        public string Index()
        {
            return GetInfo(this, business);
        }

        public string Schema()
        {
            return GetSchema(this, business);
        }

        //************************************************POST************************************************
        [HttpPost]
        public ActionResult GetHeader(InputGetHeader input)
        {
            var result = business.GetHeader(input);
            return Json(result);
        }

        [HttpPost]
        public ActionResult GetColumnHeader(InputGetColumnHeader input)
        {
            var result = business.GetColumnHeader(input);
            return Json(result);
        }
    }
}
